home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / tex-k / tex-k-archive.past / 1994.12.gz / 1994.12 / 000045_tim@maths.tcd.ie_Thu Dec 8 20:31:47 1994.msg < prev    next >
Internet Message Format  |  1994-12-30  |  4KB

  1. Received: from salmon.maths.tcd.ie by cs.umb.edu with SMTP id AA26644
  2.   (5.65c/IDA-1.4.4 for <tex-k@cs.umb.edu>); Thu, 8 Dec 1994 20:31:47 -0500
  3. Received: from hamilton.maths.tcd.ie by salmon.maths.tcd.ie  with SMTP
  4.           id aa23553; 8 Dec 94 14:44 GMT
  5. Subject: Re: debugging search paths in kpathsea
  6. To: Dan Karron <dan@tesla.psych.nyu.edu>
  7. Date: Thu, 8 Dec 1994 14:44:20 (GMT)
  8. From: Timothy Murphy <tim@maths.tcd.ie>
  9. Cc: tex-k@cs.umb.edu
  10. In-Reply-To: <9412080440.AA03948@tesla.psych.nyu.edu> from "Dan Karron" at Dec 7, 94 11:40:43 pm
  11. X-Mailer: ELM [version 2.4 PL21]
  12. Mime-Version: 1.0
  13. Content-Type: text/plain; charset=US-ASCII
  14. Content-Transfer-Encoding: 7bit
  15. Content-Length: 2807      
  16. Message-Id:  <9412081444.aa02207@hamilton.maths.tcd.ie>
  17.  
  18. > Anyone give any thought to some debugging vars in kpathsea ?
  19. There are full debugging facilities in kpathsea.
  20. These are easily accessed in dvips or xdvi (and probably dvilj)
  21. by using the "-d" switch, eg
  22.  
  23. dvips -d-1 -P<printer> <filename>
  24.  
  25. will start full (probably too full) debugging.
  26.  
  27. There is a problem accessing the facility from web2c,
  28. even after applying John Interrante's web2c.kpathsea-2.4.help patch.
  29. However, the additional patch below was posted (not by me).
  30. This allows the debugger to be turned on by setting an environment variable.
  31.  
  32. ===========================================================
  33.  
  34. Date: Mon, 24 Oct 94 16:28 EDT
  35. From: Neal Becker <neal@ctd.comsat.com>
  36. To: tex-k@cs.umb.edu
  37. Subject: New patch to pathsearch
  38.  
  39. Here is my latest patch.  This one sets up kpathsea_debug using
  40. environment variable KPSE_DEBUG, oring it with any setting by the
  41. client application.  Sounds like a win to me.
  42.  
  43. Also warnings are printed for any files that are not found.  I don't
  44. know if this will prove to be something that should be selectably
  45. turned off or not.  I'm assuming that most performance concerned
  46. people will want to finally know why TeX is so slow.  Maybe they will
  47. now see why and fix it.
  48.  
  49. *** 1.1    1994/10/24 17:42:52
  50. --- pathsearch.c    1994/10/24 20:17:50
  51. ***************
  52. *** 323,333 ****
  53.   
  54.   /* Search PATH for the first NAME.  */
  55.   
  56.   string
  57.   kpse_path_search P3C(const_string, path,  const_string, name,
  58.                        boolean, must_exist)
  59.   {
  60. !   string *ret_list = search (path, name, must_exist, false);
  61.     return *ret_list;
  62.   }
  63.   
  64. --- 323,349 ----
  65.   
  66.   /* Search PATH for the first NAME.  */
  67.   
  68. + static int kpse_debug_env_init_done = 0;
  69. + void kpse_debug_env_init() {
  70. +   char* c = getenv ("KPSE_DEBUG");
  71. +   if (c) 
  72. +     kpathsea_debug |= atoi (c);
  73. +   kpse_debug_env_init_done++;
  74. + }
  75.   string
  76.   kpse_path_search P3C(const_string, path,  const_string, name,
  77.                        boolean, must_exist)
  78.   {
  79. !   string *ret_list;
  80. !   if (!kpse_debug_env_init_done)
  81. !     kpse_debug_env_init();
  82. !   ret_list = search (path, name, must_exist, false);
  83. !   if (!*ret_list)
  84. !     fprintf (stderr, "kpathsea::search failed for %s\n", name);
  85.     return *ret_list;
  86.   }
  87.   
  88. ***************
  89. *** 338,344 ****
  90.   string *
  91.   kpse_all_path_search P2C(const_string, path,  const_string, name)
  92.   {
  93. !   string *ret = search (path, name, true, true);
  94.     return ret;
  95.   }
  96.   
  97. --- 354,367 ----
  98.   string *
  99.   kpse_all_path_search P2C(const_string, path,  const_string, name)
  100.   {
  101. !   string *ret;
  102. !   if (!kpse_debug_env_init_done)
  103. !     kpse_debug_env_init();
  104. !   ret = search (path, name, true, true);
  105. !   if (!*ret)
  106. !     fprintf (stderr, "kpathsea::search failed for %s\n", name);
  107.     return ret;
  108.   }
  109. ===========================================================
  110.  
  111.  
  112.  
  113.  
  114.